package com.wh.dao;

import com.wh.pojo.User;
import com.wh.utils.UtilsC3p0;
import org.apache.commons.dbutils.handlers.BeanHandler;

import java.sql.Connection;
import java.sql.SQLException;

/**
 * @Auther: HuiEr
 * @Date: 2020/2/26 22:38
 * @Description
 */
public class UserMapper {

    public User findUserByName(String username) throws SQLException {
        return UtilsC3p0.getQueryRunner().query("select * from tttt_user where userName=?",new BeanHandler<User>(User.class),username);
    }
}
